Skip to content

Ship localized resources for C++ unit test framework - #16682

Merged
Artur Spychaj (drognanar) merged 2 commits into
mainfrom
dev/arturs/cpp-loc-satellites
Nov 25, 2026
Merged

Artur Spychaj (drognanar) merged 2 commits into
mainfrom
dev/arturs/cpp-loc-satellites

Conversation

@drognanar

Copy link
Copy Markdown
Member

Problem

C++ unit test framework messages (for example "Stack trace is not available. This may be because of missing PDB file(s)") always show in English on localized Visual Studio.

Microsoft.Internal.TestPlatform.Extensions already ships the translated culture satellites under tools/net451/Extensions/Cpp/<culture>/:

  • Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.Resources.dll
  • Microsoft.VisualStudio.TestTools.CppUnitTestFramework.TestEngine.resources.dll

However, the V2.CLI VSIX glob (Extensions\Cpp\*) is non-recursive, and Microsoft.TestPlatform.csproj lists Cpp files explicitly, so the <culture> subfolders were never packaged. The native executor looks for <moduleDir>\<culture>\...Executor.Resources.dll and falls back to the neutral English resources.

Fix

  • V2.CLI VSIX: add Extensions\Cpp\<culture>\*.dll for the 13 VS cultures.
  • Microsoft.TestPlatform nupkg: add the 26 satellite files under tools\net462\Common7\IDE\Extensions\TestPlatform\Extensions\Cpp\<culture>\.
  • Update eng/expected-nupkg-file-counts.json (+26 each: 555 -> 581, 403 -> 429).

Validation

  • build.cmd -c Release -pack locally. The nupkg and VSIX each contain the 26 culture satellites (for example Extensions/Cpp/ja/...Executor.Resources.dll). The only failure was VS manifest merging on the local arm64 MSBuild, which is unrelated.
  • eng/verify-nupkgs.ps1 passes.
  • End to end, with these satellites placed in Extensions\Cpp\ja together with the companion executor loader fix (internal VS PR 806421, which makes the executor honor the VS UI language), the "missing PDB" message is shown in Japanese (VSLANG=1041) and pt-BR (1046).

Fixes AB#1557250

Copilot AI balanced review requested due to automatic review settings November 12, 2026 13:14

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the packaging changes: Microsoft.TestPlatform.csproj, the V2.CLI VSIX csproj and eng/expected-nupkg-file-counts.json. I found nothing blocking.

  • The nupkg adds 13 cultures × 2 satellites = 26 files, which matches the +26 in both expected counts (555→581, 403→429).
  • The culture list is the same in the nupkg and the VSIX. The Executor.Resources.dll vs TestEngine.resources.dll casing matches the PR description.
  • The new Cpp\<culture>\*.dll VSIX globs follow the existing VsixSourceItem pattern.
  • The PR description matches the diff.

Limits: I did not build or pack, so I could not confirm the files exist on disk at those paths. eng/expected-dll-frameworks.json was not touched. Satellite resource assemblies are usually excluded from that check, but it is worth confirming that CI passes.

🧠 Reviewed by expert-reviewer workflow

🧠 Reviewed by Expert Code Reviewer 🧠

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the changes packaging localized C++ test framework resources.

No open issues 🎉

What changed in this PR

This PR packages existing C++ unit test framework translations with VSTest so localized resources are available alongside the executor. Honoring the Visual Studio UI language also requires the companion executor loader fix described in the PR.

Changes:

  • Include satellite DLLs for 13 cultures in the V2.CLI VSIX.
  • Add 26 satellite files to the Microsoft.TestPlatform NuGet package.
  • Increase both affected package file-count baselines by 26.
File Description
src/​package/​Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/​Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI.csproj Includes culture-specific C++ resource DLLs in the VSIX.
src/​package/​Microsoft.TestPlatform/​Microsoft.TestPlatform.csproj Packages 26 C++ resource satellites in their culture folders.
eng/​expected-nupkg-file-counts.json Updates expected counts to 581 and 429 for the affected packages.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 12, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the localized C++ resource packaging changes.

No open issues 🎉

Review effort: Balanced

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the packaging changes in Microsoft.TestPlatform.csproj, the V2.CLI VSIX csproj and eng/expected-nupkg-file-counts.json.

  • 13 locales × 2 satellite DLLs (Executor.Resources, TestEngine.resources) = 26 new files. This matches the count bumps: Microsoft.TestPlatform 555→581 and V2.CLI 403→429.
  • Locale lists and subpaths are consistent between the nupkg and VSIX entries.
  • Not verified (no build access): that every satellite DLL exists in the Extensions\Cpp\<locale> input folder. The Executor.Resources.dll vs TestEngine.resources.dll casing is mixed, so an exact-case match matters on case-sensitive file systems. A missing file would fail the pack.
  • eng/expected-dll-frameworks.json is not touched. Please confirm it doesn't track these resource DLLs, and that the counts came from a clean -c Release -pack build.

No blocking issues found. The PR description matches the diff.

🧠 Reviewed by expert-reviewer workflow

🧠 Reviewed by Expert Code Reviewer 🧠

Copilot AI balanced review requested due to automatic review settings November 20, 2026 15:29

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the packaging changes: 13 cultures × 2 satellites = 26 entries in both the Microsoft.TestPlatform nupkg and the V2.CLI VSIX. Paths and culture lists match between the two projects, and the +26 updates in eng/expected-nupkg-file-counts.json (555→581, 403→429) are consistent. The PR description matches the diff. No findings. This is a COMMENT review, not an approval; that is left to a maintainer.

Verification limits: I couldn't confirm the satellite files exist in Microsoft.Internal.TestPlatform.Extensions or that they are absent from expected-dll-frameworks.json. The author's local -pack and verify-nupkgs.ps1 run covers this.

🧠 Reviewed by expert-reviewer workflow

🧠 Reviewed by Expert Code Reviewer 🧠

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The companion native loader changes in internal VS PR 806421 are unavailable for review, and the reported manifest-merge failure leaves successful VSIX generation and localized loading requiring human validation.

No open issues 🎉

Review effort: Balanced

The Microsoft.Internal.TestPlatform.Extensions package contains culture
satellites under Extensions\Cpp\<culture>\ (Executor.Resources.dll and
TestEngine.resources.dll), but the VSIX and Microsoft.TestPlatform nupkg
only picked up top-level Cpp files, so C++ test messages such as
'Stack trace is not available...' always showed in English.

Fixes AB#1557250

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the localized C++ resource packaging changes.

No open issues 🎉

Review effort: Balanced

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the packaging changes (nupkg <None> items, VSIX VsixSourceItem entries, expected counts). No blocking issues found.

  • The 13 cultures × 2 satellite DLLs match between the nupkg and VSIX, and both add +26 files. The eng/expected-nupkg-file-counts.json deltas are consistent with that.
  • [Description] The PR text says the Microsoft.TestPlatform count goes 555 -> 581, but the diff has 556 -> 582. The description looks stale and should be updated.
  • Not verified: the satellite paths under Microsoft.Internal.TestPlatform.Extensions and the actual package contents. I could not build, so I relied on the author's verify-nupkgs.ps1 result. The PR does not list Microsoft.TestPlatform.CLI or Portable as changed, which seems right if they do not carry the Cpp extension.

🧠 Reviewed by expert reviewer workflow

🧠 Reviewed by Expert Code Reviewer 🧠

@drognanar
Artur Spychaj (drognanar) merged commit 7760a31 into main Nov 25, 2026
34 checks passed
@drognanar
Artur Spychaj (drognanar) deleted the dev/arturs/cpp-loc-satellites branch November 25, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants